<%var csstpl = {%>
<style type="text/css">
	[v-cloak] {
		display: none
	}
</style>
<%};%>
<%layout("../layout/_layout_layui.html",{title:'管理员列表页面',csstpl:csstpl}){ %>
<div class="layui-row">
	<form class="layui-form" method="post" action="/system/role/user" role="form">
		<div class="layui-col-md8">
			<div class="layui-form-item">
				<div class="layui-input-inline">
					<input type="text" name="admin.name" value="${admin.name!}" placeholder="用户真实姓名查询" autocomplete="off" class="layui-input">
				</div>
				<div class="layui-input-inline">
					<input type="text" name="admin.username" value="${admin.username!}" placeholder="请输入用户名查询" autocomplete="off" class="layui-input">
				</div>
			</div>
		</div>

		<div class="layui-col-md3">
			<div class="layui-form-item">
				<button type="submit" class="layui-btn">
									<i class="layui-icon">&#xe615;</i> 查询/筛选
								</button>
				<a href="/system/role/user/add_edit" type="submit" class="layui-btn layui-btn-normal">
					<i class="layui-icon">&#xe608;</i> 添加用户
				</a>
			</div>
		</div>
		<table class="layui-table">
			<thead>
				<tr>
					<th>用户ID</th>
					<th>用户名</th>
					<th>姓名</th>
					<th>权限组</th>
					<th>状态</th>
					<th>操作</th>
				</tr>
			</thead>
			<tbody>
				<%for(admin in data.list!){ %>
				<tr>
					<td>${admin.id}</td>
					<td>${admin.username}</td>
					<td>${admin.name}</td>
					<td>${admin.roleNames}</td>
					<%
						if(admin.state==0){
						print("<td><span class='layui-badge layui-bg-green'>正常</span></td>");
						}else{
						print("<td><span class='layui-badge layui-bg-gray'>禁用</span></td>");
						}
						%>
					<td class="action-col">
						<%if(admin.username!="admin"){ %>
						<div class="layui-btn-group">
							<a class="layui-btn layui-btn-primary layui-btn-sm" href="/system/role/user/add_edit/${admin.id}"><i class="layui-icon">&#xe642;</i> 修改</a>
							<a class="layui-btn layui-btn-primary layui-btn-sm" href="javascript:gx.del('/system/role/user/delete/${admin.id}')"><i class="layui-icon">&#xe640;</i> 删除</a>

						</div>
					</td>
					<%}%>
				</tr>
				<%}%>
			</tbody>
		</table>
		<%include("/jsp/_paginate.html"){}%>
	</form>
</div>

<script>
	$(function() {

	})
</script>
<%}%>